#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    connect(ui->pushButton, SIGNAL(clicked()), this, SLOT(PressButton()));
    connect(ui->pushButton_2, SIGNAL(clicked()), this, SLOT(PressButton2()));
    connect(ui->pushButton_3, SIGNAL(clicked()), this, SLOT(PressButton3()));

    ui->comboBox->addItem("asdfasd");
    ui->comboBox->addItem("asdfasd");

}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::PressButton()
{

    ui->lineEdit->setText("dfgh");
    ui->lineEdit_2->setText("sveta");
    ui->checkBox->setChecked(!ui->checkBox->checkState());
    ui->progressBar->setValue(ui->progressBar->value()+10);
    ui->checkBox_2->setChecked(!ui->checkBox_2->checkState());
}


void MainWindow::PressButton2()
{
    ui->progressBar->setValue(ui->progressBar->value() - 6 );
    ui->dial->setValue(ui->dial->value()+1);
}


void MainWindow::PressButton3()
{
    ui->progressBar_2->setValue(ui->progressBar_2->value() + 9);

}
